package cn.niit.letuseatdemo.util;


import cn.niit.letuseatdemo.entity.domain.User;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Author: yang_yong
 * @CreateTime： 2022/11/18 10:21
 */
@Component
public class H5LoginUtil {

    private static ThreadLocal<User> threadLocal = new ThreadLocal<User>();

    public static User getLoginUser() {
        return threadLocal.get();
    }
    public static void setLoginUser(User user) {
        threadLocal.set(user);
    }
}
